(function () {
	'use strict'
	
	var spawn = require('child_process').spawn,
	    child = spawn('cmd', ['/c', 'dir'] );
	
	child.stdout.on('data', function (data) {
		console.log('ev data, datalen: ' + data.length);
		//console.log(data.toString());
	});
	
	child.on('close', function (code, signal) {
		console.log('ev close, code: ' + code + ' signal: ' + signal);
	});
	
	child.on('exit', function (code) {
		console.log('ev exit, code: ' + code);
	});
	
	child.on('error', function (error) {
		console.log(error);
	});
	
	//child.kill();
}());
